#!/bin/sh

# colours for output
norm="[0m";
bold="[1;10m";
green="[1;32m";
red="[1;31m";
yellow="[1;33m";

echo "identity.newick(1) : 0 0 " > identity-matrix
echo "identity.newick(1) : 0 0 " >> identity-matrix

test_identity() {
    $srcdir/tests/tree-builder.py 10 > identity.newick
    ./qq identity.newick identity.newick > dist_matrix

    if ! cmp identity-matrix dist_matrix; then
	echo "$red./tests/identity.newick compared with itself has dist $dist$norm"
	exit 2
    fi

    rm dist_matrix
}

for i in 0 1 2 3 4 5 6; do
    test_identity
done
rm identity.newick
rm identity-matrix
